package com.example.jiaopin.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.jiaopin.model.CourseEvaluation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CourseEvaluationMapper extends BaseMapper<CourseEvaluation> {

    // 添加课程评价
    int insert(CourseEvaluation courseEvaluation);

    // 删除课程评价
    int deleteById(@Param("evaluationId") Integer evaluationId);

    // 根据课程ID查询所有评价
    List<CourseEvaluation> selectByCourseId(@Param("courseId") Integer courseId);
}
